package cn.edu.zjgsu.ito.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import cn.edu.zjgsu.ito.util.Paginator;

public class VouchersExample extends Paginator{
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public VouchersExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andVouchersIdIsNull() {
            addCriterion("vouchers_id is null");
            return (Criteria) this;
        }

        public Criteria andVouchersIdIsNotNull() {
            addCriterion("vouchers_id is not null");
            return (Criteria) this;
        }

        public Criteria andVouchersIdEqualTo(Integer value) {
            addCriterion("vouchers_id =", value, "vouchersId");
            return (Criteria) this;
        }

        public Criteria andVouchersIdNotEqualTo(Integer value) {
            addCriterion("vouchers_id <>", value, "vouchersId");
            return (Criteria) this;
        }

        public Criteria andVouchersIdGreaterThan(Integer value) {
            addCriterion("vouchers_id >", value, "vouchersId");
            return (Criteria) this;
        }

        public Criteria andVouchersIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("vouchers_id >=", value, "vouchersId");
            return (Criteria) this;
        }

        public Criteria andVouchersIdLessThan(Integer value) {
            addCriterion("vouchers_id <", value, "vouchersId");
            return (Criteria) this;
        }

        public Criteria andVouchersIdLessThanOrEqualTo(Integer value) {
            addCriterion("vouchers_id <=", value, "vouchersId");
            return (Criteria) this;
        }

        public Criteria andVouchersIdIn(List<Integer> values) {
            addCriterion("vouchers_id in", values, "vouchersId");
            return (Criteria) this;
        }

        public Criteria andVouchersIdNotIn(List<Integer> values) {
            addCriterion("vouchers_id not in", values, "vouchersId");
            return (Criteria) this;
        }

        public Criteria andVouchersIdBetween(Integer value1, Integer value2) {
            addCriterion("vouchers_id between", value1, value2, "vouchersId");
            return (Criteria) this;
        }

        public Criteria andVouchersIdNotBetween(Integer value1, Integer value2) {
            addCriterion("vouchers_id not between", value1, value2, "vouchersId");
            return (Criteria) this;
        }

        public Criteria andVouchersNameIsNull() {
            addCriterion("vouchers_name is null");
            return (Criteria) this;
        }

        public Criteria andVouchersNameIsNotNull() {
            addCriterion("vouchers_name is not null");
            return (Criteria) this;
        }

        public Criteria andVouchersNameEqualTo(String value) {
            addCriterion("vouchers_name =", value, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameNotEqualTo(String value) {
            addCriterion("vouchers_name <>", value, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameGreaterThan(String value) {
            addCriterion("vouchers_name >", value, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameGreaterThanOrEqualTo(String value) {
            addCriterion("vouchers_name >=", value, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameLessThan(String value) {
            addCriterion("vouchers_name <", value, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameLessThanOrEqualTo(String value) {
            addCriterion("vouchers_name <=", value, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameLike(String value) {
            addCriterion("vouchers_name like", value, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameNotLike(String value) {
            addCriterion("vouchers_name not like", value, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameIn(List<String> values) {
            addCriterion("vouchers_name in", values, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameNotIn(List<String> values) {
            addCriterion("vouchers_name not in", values, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameBetween(String value1, String value2) {
            addCriterion("vouchers_name between", value1, value2, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersNameNotBetween(String value1, String value2) {
            addCriterion("vouchers_name not between", value1, value2, "vouchersName");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceIsNull() {
            addCriterion("vouchers_price is null");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceIsNotNull() {
            addCriterion("vouchers_price is not null");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceEqualTo(String value) {
            addCriterion("vouchers_price =", value, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceNotEqualTo(String value) {
            addCriterion("vouchers_price <>", value, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceGreaterThan(String value) {
            addCriterion("vouchers_price >", value, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceGreaterThanOrEqualTo(String value) {
            addCriterion("vouchers_price >=", value, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceLessThan(String value) {
            addCriterion("vouchers_price <", value, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceLessThanOrEqualTo(String value) {
            addCriterion("vouchers_price <=", value, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceLike(String value) {
            addCriterion("vouchers_price like", value, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceNotLike(String value) {
            addCriterion("vouchers_price not like", value, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceIn(List<String> values) {
            addCriterion("vouchers_price in", values, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceNotIn(List<String> values) {
            addCriterion("vouchers_price not in", values, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceBetween(String value1, String value2) {
            addCriterion("vouchers_price between", value1, value2, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersPriceNotBetween(String value1, String value2) {
            addCriterion("vouchers_price not between", value1, value2, "vouchersPrice");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeIsNull() {
            addCriterion("vouchers_createtime is null");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeIsNotNull() {
            addCriterion("vouchers_createtime is not null");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeEqualTo(Date value) {
            addCriterion("vouchers_createtime =", value, "vouchersCreatetime");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeNotEqualTo(Date value) {
            addCriterion("vouchers_createtime <>", value, "vouchersCreatetime");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeGreaterThan(Date value) {
            addCriterion("vouchers_createtime >", value, "vouchersCreatetime");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("vouchers_createtime >=", value, "vouchersCreatetime");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeLessThan(Date value) {
            addCriterion("vouchers_createtime <", value, "vouchersCreatetime");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeLessThanOrEqualTo(Date value) {
            addCriterion("vouchers_createtime <=", value, "vouchersCreatetime");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeIn(List<Date> values) {
            addCriterion("vouchers_createtime in", values, "vouchersCreatetime");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeNotIn(List<Date> values) {
            addCriterion("vouchers_createtime not in", values, "vouchersCreatetime");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeBetween(Date value1, Date value2) {
            addCriterion("vouchers_createtime between", value1, value2, "vouchersCreatetime");
            return (Criteria) this;
        }

        public Criteria andVouchersCreatetimeNotBetween(Date value1, Date value2) {
            addCriterion("vouchers_createtime not between", value1, value2, "vouchersCreatetime");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeIsNull() {
            addCriterion("vouchers_failuretime is null");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeIsNotNull() {
            addCriterion("vouchers_failuretime is not null");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeEqualTo(Date value) {
            addCriterion("vouchers_failuretime =", value, "vouchersFailuretime");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeNotEqualTo(Date value) {
            addCriterion("vouchers_failuretime <>", value, "vouchersFailuretime");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeGreaterThan(Date value) {
            addCriterion("vouchers_failuretime >", value, "vouchersFailuretime");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeGreaterThanOrEqualTo(Date value) {
            addCriterion("vouchers_failuretime >=", value, "vouchersFailuretime");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeLessThan(Date value) {
            addCriterion("vouchers_failuretime <", value, "vouchersFailuretime");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeLessThanOrEqualTo(Date value) {
            addCriterion("vouchers_failuretime <=", value, "vouchersFailuretime");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeIn(List<Date> values) {
            addCriterion("vouchers_failuretime in", values, "vouchersFailuretime");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeNotIn(List<Date> values) {
            addCriterion("vouchers_failuretime not in", values, "vouchersFailuretime");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeBetween(Date value1, Date value2) {
            addCriterion("vouchers_failuretime between", value1, value2, "vouchersFailuretime");
            return (Criteria) this;
        }

        public Criteria andVouchersFailuretimeNotBetween(Date value1, Date value2) {
            addCriterion("vouchers_failuretime not between", value1, value2, "vouchersFailuretime");
            return (Criteria) this;
        }

        public Criteria andVouchersStateIsNull() {
            addCriterion("vouchers_state is null");
            return (Criteria) this;
        }

        public Criteria andVouchersStateIsNotNull() {
            addCriterion("vouchers_state is not null");
            return (Criteria) this;
        }

        public Criteria andVouchersStateEqualTo(Integer value) {
            addCriterion("vouchers_state =", value, "vouchersState");
            return (Criteria) this;
        }

        public Criteria andVouchersStateNotEqualTo(Integer value) {
            addCriterion("vouchers_state <>", value, "vouchersState");
            return (Criteria) this;
        }

        public Criteria andVouchersStateGreaterThan(Integer value) {
            addCriterion("vouchers_state >", value, "vouchersState");
            return (Criteria) this;
        }

        public Criteria andVouchersStateGreaterThanOrEqualTo(Integer value) {
            addCriterion("vouchers_state >=", value, "vouchersState");
            return (Criteria) this;
        }

        public Criteria andVouchersStateLessThan(Integer value) {
            addCriterion("vouchers_state <", value, "vouchersState");
            return (Criteria) this;
        }

        public Criteria andVouchersStateLessThanOrEqualTo(Integer value) {
            addCriterion("vouchers_state <=", value, "vouchersState");
            return (Criteria) this;
        }

        public Criteria andVouchersStateIn(List<Integer> values) {
            addCriterion("vouchers_state in", values, "vouchersState");
            return (Criteria) this;
        }

        public Criteria andVouchersStateNotIn(List<Integer> values) {
            addCriterion("vouchers_state not in", values, "vouchersState");
            return (Criteria) this;
        }

        public Criteria andVouchersStateBetween(Integer value1, Integer value2) {
            addCriterion("vouchers_state between", value1, value2, "vouchersState");
            return (Criteria) this;
        }

        public Criteria andVouchersStateNotBetween(Integer value1, Integer value2) {
            addCriterion("vouchers_state not between", value1, value2, "vouchersState");
            return (Criteria) this;
        }

        public Criteria andVouchersDateIsNull() {
            addCriterion("vouchers_date is null");
            return (Criteria) this;
        }

        public Criteria andVouchersDateIsNotNull() {
            addCriterion("vouchers_date is not null");
            return (Criteria) this;
        }

        public Criteria andVouchersDateEqualTo(Integer value) {
            addCriterion("vouchers_date =", value, "vouchersDate");
            return (Criteria) this;
        }

        public Criteria andVouchersDateNotEqualTo(Integer value) {
            addCriterion("vouchers_date <>", value, "vouchersDate");
            return (Criteria) this;
        }

        public Criteria andVouchersDateGreaterThan(Integer value) {
            addCriterion("vouchers_date >", value, "vouchersDate");
            return (Criteria) this;
        }

        public Criteria andVouchersDateGreaterThanOrEqualTo(Integer value) {
            addCriterion("vouchers_date >=", value, "vouchersDate");
            return (Criteria) this;
        }

        public Criteria andVouchersDateLessThan(Integer value) {
            addCriterion("vouchers_date <", value, "vouchersDate");
            return (Criteria) this;
        }

        public Criteria andVouchersDateLessThanOrEqualTo(Integer value) {
            addCriterion("vouchers_date <=", value, "vouchersDate");
            return (Criteria) this;
        }

        public Criteria andVouchersDateIn(List<Integer> values) {
            addCriterion("vouchers_date in", values, "vouchersDate");
            return (Criteria) this;
        }

        public Criteria andVouchersDateNotIn(List<Integer> values) {
            addCriterion("vouchers_date not in", values, "vouchersDate");
            return (Criteria) this;
        }

        public Criteria andVouchersDateBetween(Integer value1, Integer value2) {
            addCriterion("vouchers_date between", value1, value2, "vouchersDate");
            return (Criteria) this;
        }

        public Criteria andVouchersDateNotBetween(Integer value1, Integer value2) {
            addCriterion("vouchers_date not between", value1, value2, "vouchersDate");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreIsNull() {
            addCriterion("vouchers_score is null");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreIsNotNull() {
            addCriterion("vouchers_score is not null");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreEqualTo(Integer value) {
            addCriterion("vouchers_score =", value, "vouchersScore");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreNotEqualTo(Integer value) {
            addCriterion("vouchers_score <>", value, "vouchersScore");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreGreaterThan(Integer value) {
            addCriterion("vouchers_score >", value, "vouchersScore");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreGreaterThanOrEqualTo(Integer value) {
            addCriterion("vouchers_score >=", value, "vouchersScore");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreLessThan(Integer value) {
            addCriterion("vouchers_score <", value, "vouchersScore");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreLessThanOrEqualTo(Integer value) {
            addCriterion("vouchers_score <=", value, "vouchersScore");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreIn(List<Integer> values) {
            addCriterion("vouchers_score in", values, "vouchersScore");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreNotIn(List<Integer> values) {
            addCriterion("vouchers_score not in", values, "vouchersScore");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreBetween(Integer value1, Integer value2) {
            addCriterion("vouchers_score between", value1, value2, "vouchersScore");
            return (Criteria) this;
        }

        public Criteria andVouchersScoreNotBetween(Integer value1, Integer value2) {
            addCriterion("vouchers_score not between", value1, value2, "vouchersScore");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeIsNull() {
            addCriterion("vouchers_type is null");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeIsNotNull() {
            addCriterion("vouchers_type is not null");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeEqualTo(Integer value) {
            addCriterion("vouchers_type =", value, "vouchersType");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeNotEqualTo(Integer value) {
            addCriterion("vouchers_type <>", value, "vouchersType");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeGreaterThan(Integer value) {
            addCriterion("vouchers_type >", value, "vouchersType");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("vouchers_type >=", value, "vouchersType");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeLessThan(Integer value) {
            addCriterion("vouchers_type <", value, "vouchersType");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeLessThanOrEqualTo(Integer value) {
            addCriterion("vouchers_type <=", value, "vouchersType");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeIn(List<Integer> values) {
            addCriterion("vouchers_type in", values, "vouchersType");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeNotIn(List<Integer> values) {
            addCriterion("vouchers_type not in", values, "vouchersType");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeBetween(Integer value1, Integer value2) {
            addCriterion("vouchers_type between", value1, value2, "vouchersType");
            return (Criteria) this;
        }

        public Criteria andVouchersTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("vouchers_type not between", value1, value2, "vouchersType");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}